package cn.yuanqiao.cqbc.inspectionLog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.yuanqiao.cqbc.inspectionLog.mapper.InspectionLogMapper;
import cn.yuanqiao.cqbc.inspectionLog.domain.InspectionLog;
import cn.yuanqiao.cqbc.inspectionLog.service.IInspectionLogService;

/**
 * 巡检日志Service业务层处理
 * 
 * @author xy
 * @date 2024-06-20
 */
@Service
public class InspectionLogServiceImpl implements IInspectionLogService 
{
    @Autowired
    private InspectionLogMapper inspectionLogMapper;

    /**
     * 查询巡检日志
     * 
     * @param id 巡检日志主键
     * @return 巡检日志
     */
    @Override
    public InspectionLog selectInspectionLogById(Long id)
    {
        return inspectionLogMapper.selectInspectionLogById(id);
    }

    /**
     * 查询巡检日志列表
     * 
     * @param inspectionLog 巡检日志
     * @return 巡检日志
     */
    @Override
    public List<InspectionLog> selectInspectionLogList(InspectionLog inspectionLog)
    {
        return inspectionLogMapper.selectInspectionLogList(inspectionLog);
    }

    /**
     * 新增巡检日志
     * 
     * @param inspectionLog 巡检日志
     * @return 结果
     */
    @Override
    public int insertInspectionLog(InspectionLog inspectionLog)
    {
        return inspectionLogMapper.insertInspectionLog(inspectionLog);
    }

    /**
     * 修改巡检日志
     * 
     * @param inspectionLog 巡检日志
     * @return 结果
     */
    @Override
    public int updateInspectionLog(InspectionLog inspectionLog)
    {
        return inspectionLogMapper.updateInspectionLog(inspectionLog);
    }

    /**
     * 批量删除巡检日志
     * 
     * @param ids 需要删除的巡检日志主键
     * @return 结果
     */
    @Override
    public int deleteInspectionLogByIds(Long[] ids)
    {
        return inspectionLogMapper.deleteInspectionLogByIds(ids,new InspectionLog().getTableName());
    }

    /**
     * 删除巡检日志信息
     * 
     * @param id 巡检日志主键
     * @return 结果
     */
    @Override
    public int deleteInspectionLogById(Long id)
    {
        return inspectionLogMapper.deleteInspectionLogById(id);
    }
}
